Optimal. Leaf size=85 \[ -\frac {\text {ArcTan}\left (\frac {\sqrt {a-b} \cot (c+d x)}{\sqrt {a+b \cot ^2(c+d x)}}\right )}{(a-b)^{3/2} d}+\frac {b \cot (c+d x)}{a (a-b) d \sqrt {a+b \cot ^2(c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3742, 390, 385,
209} \begin {gather*} \frac {b \cot (c+d x)}{a d (a-b) \sqrt {a+b \cot ^2(c+d x)}}-\frac {\text {ArcTan}\left (\frac {\sqrt {a-b} \cot (c+d x)}{\sqrt {a+b \cot ^2(c+d x)}}\right )}{d (a-b)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 385
Rule 390
Rule 3742
Rubi steps
\begin {align*} \int \frac {1}{\left (a+b \cot ^2(c+d x)\right )^{3/2}} \, dx &=-\frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {b \cot (c+d x)}{a (a-b) d \sqrt {a+b \cot ^2(c+d x)}}-\frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\cot (c+d x)\right )}{(a-b) d}\\ &=\frac {b \cot (c+d x)}{a (a-b) d \sqrt {a+b \cot ^2(c+d x)}}-\frac {\text {Subst}\left (\int \frac {1}{1-(-a+b) x^2} \, dx,x,\frac {\cot (c+d x)}{\sqrt {a+b \cot ^2(c+d x)}}\right )}{(a-b) d}\\ &=-\frac {\tan ^{-1}\left (\frac {\sqrt {a-b} \cot (c+d x)}{\sqrt {a+b \cot ^2(c+d x)}}\right )}{(a-b)^{3/2} d}+\frac {b \cot (c+d x)}{a (a-b) d \sqrt {a+b \cot ^2(c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 3.76, size = 231, normalized size = 2.72 \begin {gather*} -\frac {\cos ^2(c+d x) \cot (c+d x) \left (4 (a-b)^2 \cos ^2(c+d x) \, _2F_1\left (2,2;\frac {7}{2};\frac {(a-b) \cos ^2(c+d x)}{a}\right ) \left (b+a \tan ^2(c+d x)\right )-\frac {15 a \left (2 b+3 a \tan ^2(c+d x)\right ) \left (\text {ArcSin}\left (\sqrt {\frac {(a-b) \cos ^2(c+d x)}{a}}\right ) \left (b+a \tan ^2(c+d x)\right )-a \sec ^2(c+d x) \sqrt {\frac {(a-b) \cos ^4(c+d x) \left (b+a \tan ^2(c+d x)\right )}{a^2}}\right )}{\sqrt {\frac {(a-b) \cos ^4(c+d x) \left (b+a \tan ^2(c+d x)\right )}{a^2}}}\right )}{15 a^3 (a-b) d \sqrt {a+b \cot ^2(c+d x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 102, normalized size = 1.20
method | result | size |
derivativedivides | \(\frac {\frac {b \cot \left (d x +c \right )}{\left (a -b \right ) a \sqrt {a +b \left (\cot ^{2}\left (d x +c \right )\right )}}-\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \cot \left (d x +c \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \left (\cot ^{2}\left (d x +c \right )\right )}}\right )}{\left (a -b \right )^{2} b^{2}}}{d}\) | \(102\) |
default | \(\frac {\frac {b \cot \left (d x +c \right )}{\left (a -b \right ) a \sqrt {a +b \left (\cot ^{2}\left (d x +c \right )\right )}}-\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \cot \left (d x +c \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \left (\cot ^{2}\left (d x +c \right )\right )}}\right )}{\left (a -b \right )^{2} b^{2}}}{d}\) | \(102\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 237 vs.
\(2 (77) = 154\).
time = 3.32, size = 526, normalized size = 6.19 \begin {gather*} \left [-\frac {{\left (a^{2} + a b - {\left (a^{2} - a b\right )} \cos \left (2 \, d x + 2 \, c\right )\right )} \sqrt {-a + b} \log \left (-2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (2 \, d x + 2 \, c\right )^{2} + 2 \, {\left ({\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - b\right )} \sqrt {-a + b} \sqrt {\frac {{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - a - b}{\cos \left (2 \, d x + 2 \, c\right ) - 1}} \sin \left (2 \, d x + 2 \, c\right ) + a^{2} - 2 \, b^{2} + 4 \, {\left (a b - b^{2}\right )} \cos \left (2 \, d x + 2 \, c\right )\right ) + 4 \, {\left (a b - b^{2}\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - a - b}{\cos \left (2 \, d x + 2 \, c\right ) - 1}} \sin \left (2 \, d x + 2 \, c\right )}{4 \, {\left ({\left (a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}\right )} d \cos \left (2 \, d x + 2 \, c\right ) - {\left (a^{4} - a^{3} b - a^{2} b^{2} + a b^{3}\right )} d\right )}}, \frac {{\left (a^{2} + a b - {\left (a^{2} - a b\right )} \cos \left (2 \, d x + 2 \, c\right )\right )} \sqrt {a - b} \arctan \left (-\frac {\sqrt {a - b} \sqrt {\frac {{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - a - b}{\cos \left (2 \, d x + 2 \, c\right ) - 1}} \sin \left (2 \, d x + 2 \, c\right )}{{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - b}\right ) - 2 \, {\left (a b - b^{2}\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - a - b}{\cos \left (2 \, d x + 2 \, c\right ) - 1}} \sin \left (2 \, d x + 2 \, c\right )}{2 \, {\left ({\left (a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}\right )} d \cos \left (2 \, d x + 2 \, c\right ) - {\left (a^{4} - a^{3} b - a^{2} b^{2} + a b^{3}\right )} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (a + b \cot ^{2}{\left (c + d x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 300 vs.
\(2 (77) = 154\).
time = 0.96, size = 300, normalized size = 3.53 \begin {gather*} -\frac {\frac {\frac {{\left (a^{2} b \mathrm {sgn}\left (\sin \left (d x + c\right )\right ) - 2 \, a b^{2} \mathrm {sgn}\left (\sin \left (d x + c\right )\right ) + b^{3} \mathrm {sgn}\left (\sin \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}} - \frac {a^{2} b \mathrm {sgn}\left (\sin \left (d x + c\right )\right ) - 2 \, a b^{2} \mathrm {sgn}\left (\sin \left (d x + c\right )\right ) + b^{3} \mathrm {sgn}\left (\sin \left (d x + c\right )\right )}{a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}}}{\sqrt {b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + b}} - \frac {2 \, \arctan \left (-\frac {\sqrt {b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + b} + \sqrt {b}}{2 \, \sqrt {a - b}}\right )}{{\left (a \mathrm {sgn}\left (\sin \left (d x + c\right )\right ) - b \mathrm {sgn}\left (\sin \left (d x + c\right )\right )\right )} \sqrt {a - b}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\left (b\,{\mathrm {cot}\left (c+d\,x\right )}^2+a\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________